package io.seata.sharding4.storage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.seata.sharding4.storage.entity.Storage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * Mapper 接口
 *
 * @author Administrator
 */
@Mapper
public interface StorageMapper extends BaseMapper<Storage> {
    /**
     * 扣减商品库存
     *
     * @param id    商品code
     * @param count 扣减数量
     * @return int
     */
    int decreaseStorage(@Param("id") Integer id, @Param("count") Integer count);
}
